using System.Web.Routing;
using Coderoom.ScrumPlanner.Tests.Unit.Internal;
using Coderoom.ScrumPlanner.Web;
using Coderoom.ScrumPlanner.Web.Controllers;
using MvcContrib.TestHelper;
using Xunit;

namespace Coderoom.ScrumPlanner.Tests.Unit.MvcTests
{
	public class HomeControllerRouteTests
	{
		public HomeControllerRouteTests()
		{
			RouteTable.Routes.Clear();
			MvcApplication.RegisterRoutes(RouteTable.Routes);
		}

		[Fact]
		public void Can_Navigate_To___Root()
		{
			"~/".Route().MapsTo<HomeController>(x => x.Index());
		}

		[Fact]
		public void Can_Navigate_To___About()
		{
			"~/About".Route().MapsTo<HomeController>(x => x.About());
		}

		[Fact]
		public void Can_Navigate_To___Search()
		{
			"~/Search".Route().MapsTo<HomeController>(x => x.Search());
		}
	}
}